package com.example.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @program: springcloud
 * @description: 服务消费者
 * @author: ChenZhiXiang
 * @create: 2019-06-03 11:09
 **/
@Service
public class HelloServiceImpl {

    @Autowired
    private RestTemplate restTemplate;

    public String ribbon(){
        return restTemplate.getForObject("http://service-hi/hi",String.class);
    }

}
